﻿CREATE TABLE [dbo].[TargetArea] (
    [Country]                     VARCHAR (50)      NULL,
    [SubDivision]                 VARCHAR (10)      NULL,
    [UNLocCode]                   VARCHAR (50)      NULL,
    [Circle]                      VARCHAR (500)     NULL,
    [Id]                          INT               IDENTITY (1, 1) NOT NULL,
    [EmergencyMessageContainerId] INT               NOT NULL,
    [Location]                    VARCHAR (500)     NULL,
    [Polygon]                     [sys].[geography] NULL
);




GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'The geospatial or politcal area targetings of emergency messages.', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'TargetArea';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'An enclosed geographic area within a simple closed polygon defined by an ordered set of vertices.', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'TargetArea', @level2type = N'COLUMN', @level2name = N'Polygon';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Code denoting a country.', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'TargetArea', @level2type = N'COLUMN', @level2name = N'Country';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'The ISO 3166-2 designator for an administrative subdivision', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'TargetArea', @level2type = N'COLUMN', @level2name = N'SubDivision';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'The UN/LOCODE designator for a location.', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'TargetArea', @level2type = N'COLUMN', @level2name = N'UNLocCode';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'An enclosed geographic area within a given radius around a geographic point.', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'TargetArea', @level2type = N'COLUMN', @level2name = N'Circle';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Unique identifier generated by the database management system.', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'TargetArea', @level2type = N'COLUMN', @level2name = N'Id';

